package com.sheledon.flyCat.common.utils;

import com.sheledon.flyCat.annotation.boot.Component;

public class BeanHelper {
    public static String getBeanName(Class<?> clazz){
        String name = clazz.getSimpleName();
        if (clazz.isAnnotationPresent(Component.class)){
            Component component = clazz.getAnnotation(Component.class);
            if (component.name().length()!=0){
                name = component.name();
            }
        }
        return name;
    }
}
